<!--
Copyright 2010 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
  <head>
    <style type="text/css">
      body {
        background-color: #F2F9FF;
        font-family: Helvetica, Arial, sans-serif;
      }
      h1 {
        font-size: 24px;
        font-weight: bold;
        padding-left: 5px;
        color: #484848;
      }
      label {
        float: left;
        clear: both;
        padding-right: 2pt;
      }
      input, textarea {
        float: left;
        clear: both;
      }
      input.nofloat {
        float: none;
      }
      input.submit {
        margin-top: 10px;
      }
      span.warning {
        color: #F00;
      }
      span.em {
        font-style: italic;
        font-weight: bold;
      }
      div#payload_wrapper {
        display: none;
      }
      h3,h4,h5 {
        padding: 2px;
        margin: 0px;
        color: #484848;
      }
      h3.step, div.action {
        float: left;
        clear: right;
      }
      div.action {
        padding: 5px 0px 10px;
      }
      ul {
        padding: 2px 10px;
        margin: 2px 0px 2px 15px;
      }
      ol {
        list-style-type: none;
        padding: 2px 5px;
      }
      li {
        padding-top: 7px;
        border-top: 1px solid #333;
        clear: both;
      }
      li.top {
        border-top: none;
        padding-top: 0px;
        clear: both;
      }
      p {
        padding: 0px;
        margin: 0px 5px;
      }
      p.desc {
        padding-bottom: 5px;
      }
      div.action > p {
        width: 500px;
      }
    </style>
  </head>
  <body>
    <script src="http://www.google.com/jsapi"></script>
    <script>
      // Load jQuery
      google.load("jquery", "1.3.2");
    </script>
    <h1>Legacy Gadget Migration Tool</h1>
    <p>The legacy gadget migration tool will attempt to migrate your gadgets from the deprecated legacy gadgets API to the newer, supported gadgets.* API. Keep reading to get started.</p>
    <form action="/migrate" method="post">
    <ol>
      <li class="top">
        <h3 class="step">Step 1:</h3>
        <div class="action">
          <p class="desc">Enter <span class="em">either</span> the link to the gadget XML or JavaScript in the small box, <span class="em">or</span> the raw XML or JavaScript into the larger box.</p>
          <p><label>Gadget/JavaScript link:</label><input size="50" type="text" name="url" id="url" value="" /><span id="url_warning" class="warning"></span></p>
          <p><label>Raw gadget/JavaScript code:</label><textarea rows="10" cols="50" name="raw" id="raw"></textarea><span id="raw_warning" class="warning"></span></p>
        </div>
      </li>
      <li>
        <h3 class="step">Step 2:</h3>
        <div class="action">
          <p class="desc">Decide whether or not to have the migration tool auto-insert extra code (compatibility methods) to increase compatibility. This will increase the likelihood of a complete migration, at the cost of increased code size.</p>
          <p><label>Include compatibility methods:</label><input type="checkbox" name="wrappers" id="wrappers" class="nofloat" checked /></p>
        </div>
      </li>
      <li>
        <h3 class="step">Step 3:</h3>
        <div class="action">
          <p><label>I agree to the <a href="terms.html">Terms of Service</a>:</label><input type="checkbox" name="tos" id="tos" class="nofloat" /></p>
        </div>
      </li>
      <li>
        <h3 class="step">Step 4:</h3>
        <div class="action">
          <p><label>Start the migration:</label><input class="submit" type="submit" value="Go!" class="nofloat" /></p>
        </div>
      </li>
    </ol>
    </form>
  </body>
</html>
